home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1996 September
/
JCSM Shareware Collection (JCS Distribution) (September 1996).ISO
/
bother__
/
cenvid.zip
/
CENVIDOS.ZIP
/
DISKFREE.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-10-05
|
1KB
|
29 lines
@echo OFF
REM ********************************************************************
REM *** DiskFree.bat - Display how much disk space is available on a ***
REM *** ver.1 drive, and set the DISK_FREE environment ***
REM *** variable to that amount. This batch file is ***
REM *** very specific to COMMAND.COM under MSDOS ***
REM *** version 5.0 and is not guaranteed to give ***
REM *** correct results in any other circumstance. ***
REM *** ***
REM *** Here's another method for free disk space for drive C: ***
REM *** CEnviD reg.dl=3;reg.ah=0x36;interrupt(0x21,reg); ***
REM *** DISKFREE=reg.cx * reg.ax * reg.bx; ***
REM ********************************************************************
if "%1" == "" GOTO SHOW_HOW
if not "%2"=="" GOTO SHOW_HOW
dir %1:\NUL | find "bytes free" | CEnviD DISK_FREE = atol(gets()) / 1024
ECHO DRIVE %1 HAS %DISK_FREE% K-BYTES FREE
GOTO FINI
:SHOW_HOW
ECHO DiskFree.bat - Show how much disk space is available on a drive, in kilobytes,
ECHO and set DISK_FREE environment variable to that size
ECHO USAGE: DiskFree DriveLetter
ECHO Example: DiskFree C
GOTO FINI
:FINI